import {React,Component} from "react";
// 导入PropTypes
import PropTypes from 'prop-types'
class List extends Component {
    constructor(props) {
        super(props);
    }
    state = {  }
    render() { 
        const {val,name,content} = this.props
        return (
            <ul>{
                this.state.val.map((item, index) => (
                    <div key={index}>
                        <li>{item.name}</li>
                        <span style={{ fontSize: '12px' }}>{item.content}</span>
                    </div>

                ))
            }
            </ul>
        );
    }
}
 
export default List;